(function() {	
	Wallet.widget.DashBoardTabView = function(el, config) {
		Wallet.widget.DashBoardTabView.superclass.constructor.call(this, el, config);	
	}
	
	var Lang = YAHOO.lang,
		TabView = YAHOO.widget.TabView,
		DashBoardTabView = Wallet.widget.DashBoardTabView,
		DashBoardDataTable = Wallet.widget.DashBoardDataTable,
		StatisticTabView = Wallet.widget.StatisticTabView;
	
	Lang.extend(DashBoardTabView, TabView, {
		init: function(el, attr) {
			DashBoardTabView.superclass.init.call(this, el, attr);
		},
		initAttributes: function(attr) {
			DashBoardTabView.superclass.initAttributes.call(this, attr);
			
			this.setAttributeConfig("dataTable", {
	            value: attr.dataTable,
	            method: function(value) {
	            	if (Lang.isObject(value)) {
	            		var dataTable = new DashBoardDataTable(value.el, value);
	            		this.dataTable = dataTable;
	            	}
	            },
	            validator: function(value) {
	            	return Lang.isString(value) || Lang.isObject(value);
	            }
        	});
        	this.setAttributeConfig("tabView", {
	            value: attr.tabView,
	            method: function(value) {
	            	if (Lang.isObject(value)) {	            		
	            		var tabView = new StatisticTabView(value.el, value);
	            		this.tabView = tabView;
	            	}
	            },
	            validator: function(value) {
	            	return Lang.isString(value) || Lang.isObject(value);
	            }
        	});
		}
	});
	
}());